#!/usr/bin/env bash
# Pre-commit hook: runs fast quality gates before each commit.
# Install with: make pre-commit-hook-setup
# Skip once with: git commit --no-verify
set -euo pipefail

echo "Running pre-commit quality gates..."

# Fast checks only — full test suite runs in CI
if ! make quality-gates-fast 2>&1 | sed 's/^/  /'; then
  echo ""
  echo "Pre-commit checks failed. Fix the issues above or skip with: git commit --no-verify"
  exit 1
fi

echo "Pre-commit checks passed."
